import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '选项编码',
    align: "center",
    dataIndex: 'optionCodes'
  },
  {
    title: '选项名称',
    align: "center",
    dataIndex: 'optionName'
  },
  {
    title: '设备类型',
    align: "center",
    dataIndex: 'deviceType'
  },
  {
    title: '供应厂家',
    align: "center",
    dataIndex: 'supplier'
  },
  {
    title: '维护内容',
    align: "center",
    dataIndex: 'maintenanceContent'
  },
  {
    title: '维护标准',
    align: "center",
    dataIndex: 'maintenanceStandards'
  },
  {
    title: '物料需求',
    align: "center",
    dataIndex: 'materialRequirements'
  },
  {
    title: '方法手段',
    align: "center",
    dataIndex: 'methodsMeans'
  },
  {
    title: '生产',
    align: "center",
    dataIndex: 'produce'
  },
  {
    title: '非生产',
    align: "center",
    dataIndex: 'noproduce'
  },
  {
    title: '实施频率',
    align: "center",
    dataIndex: 'implementationFrequency'
  },
  {
    title: '人次',
    align: "center",
    dataIndex: 'personTime'
  },
  {
    title: '类型',
    align: "center",
    dataIndex: 'types'
  },
  {
    title: '失败标识',
    align: "center",
    dataIndex: 'failureIdentification'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "选项编码",
    field: 'optionCodes',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "选项名称",
    field: 'optionName',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "供应厂家",
    field: 'supplier',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "实施频率",
    field: 'implementationFrequency',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "类型",
    field: 'types',
    component: 'Input',
    //colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '选项编码',
    field: 'optionCodes',
    component: 'Input',
  },
  {
    label: '选项名称',
    field: 'optionName',
    component: 'Input',
  },
  {
    label: '设备类型',
    field: 'deviceType',
    component: 'Input',
  },
  {
    label: '供应厂家',
    field: 'supplier',
    component: 'Input',
  },
  {
    label: '维护内容',
    field: 'maintenanceContent',
    component: 'Input',
  },
  {
    label: '维护标准',
    field: 'maintenanceStandards',
    component: 'Input',
  },
  {
    label: '物料需求',
    field: 'materialRequirements',
    component: 'Input',
  },
  {
    label: '方法手段',
    field: 'methodsMeans',
    component: 'Input',
  },
  {
    label: '生产',
    field: 'produce',
    component: 'InputNumber',
  },
  {
    label: '非生产',
    field: 'noproduce',
    component: 'InputNumber',
  },
  {
    label: '实施频率',
    field: 'implementationFrequency',
    component: 'Input',
  },
  {
    label: '人次',
    field: 'personTime',
    component: 'InputNumber',
  },
  {
    label: '类型',
    field: 'types',
    component: 'Input',
  },
  {
    label: '失败标识',
    field: 'failureIdentification',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  optionCodes: {title: '选项编码',order: 0,view: 'text', type: 'string',},
  optionName: {title: '选项名称',order: 1,view: 'text', type: 'string',},
  deviceType: {title: '设备类型',order: 2,view: 'text', type: 'string',},
  supplier: {title: '供应厂家',order: 3,view: 'text', type: 'string',},
  maintenanceContent: {title: '维护内容',order: 4,view: 'text', type: 'string',},
  maintenanceStandards: {title: '维护标准',order: 5,view: 'text', type: 'string',},
  materialRequirements: {title: '物料需求',order: 6,view: 'text', type: 'string',},
  methodsMeans: {title: '方法手段',order: 7,view: 'text', type: 'string',},
  produce: {title: '生产',order: 8,view: 'number', type: 'number',},
  noproduce: {title: '非生产',order: 9,view: 'number', type: 'number',},
  implementationFrequency: {title: '实施频率',order: 10,view: 'text', type: 'string',},
  personTime: {title: '人次',order: 11,view: 'number', type: 'number',},
  types: {title: '类型',order: 12,view: 'text', type: 'string',},
  failureIdentification: {title: '失败标识',order: 13,view: 'text', type: 'string',},
};
